package com.sicheng.蓝桥.练习题;

/**
 * @author zsc
 * @version 1.0
 * @date 2022/1/9 23:46
 */
@SuppressWarnings("unused")
public class Tools {
    public static long gcd(long a, long b) {//最大公因数
        return b == 0 ? a : gcd(b, a % b);
    }

    public static long lcm(long a, long b) {
        return a * b / gcd(a, b);
    }

    //取模运算
    public static long mod(long x, long y) {
        return x & y - 1;
    }


}
